<?php 
class Search_Model_Search 
{
	protected $_model=null;
	
	public static $filter = null;
	
	public $_index_fields = array('label');

	public $_unindex_fields = array();
	
	protected $_str_len = 500;
	
	public $_section_name = '';
	
	public function __construct() {
		$this->init();
		self::$filter = new Zend_Filter_StripTags();
	}
	
	public function init() {
		
	}
	
	public function getData() {
		return false;
	}
	
	public function getUrl($item) {
		return false;
	}
	
	public function getPreview($item) {
		if (	isset($item['preview']) )
			return $item['preview'];
		if (	isset($item['text']) ) {
			$text = $item['text'];
			$text = strip_tags($text);
			if (mb_strlen($text) > $this->_str_len) {
				$text = mb_strcut($text, 0, $this->_str_len,'utf-8');
				$text = $text . '...';	
			}
			return $text;
		}
		return false;
	}
	
	public function getSectionName($item) {
		return $this->_section_name;
	}
	
}